<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }
        #u1 {
            border: 1px pink solid;
            width: 150px;
            list-style-type: none;
        }
        #u1>li {
            background-color: pink;
            margin-top: 10px;
        }
        #u1>li>ul>li {
            background-color: skyblue;
            /* display: inline; */
        }
    </style>
	<script src="jquery-3.3.1.min.js"></script>
    <script>
        $(function() {
            // $("#u1>li>ul>li").css("display","none");
            $("#u1>li>ul").hide();
            $("#u1>li").mouseenter(function(){
                $(this).children("ul").stop().show(300);
            });
            $("#u1>li").mouseleave(function(){

                $(this).children("ul").stop().hide(300);
            });
        });  
    </script>
</head>
<body>
    <div class="wrap">
        <ul id="u1">
            <li>
                test1
                <ul>
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                </ul>
            </li>
            <li>
                test2
                <ul>
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                </ul>
            </li>
            <li>
                test3
                 <ul>
                        <li>1</li>
                        <li>2</li>
                        <li>3</li>
                </ul>
            </li>
        </ul>
    </div>
    

</body>
</html>